package beans;

import net.sourceforge.floggy.persistence.FloggyException;
import net.sourceforge.floggy.persistence.Persistable;
import net.sourceforge.floggy.persistence.PersistableManager;

/**
 *
 * @author Pedro Henrique
 */

public class TiposGastosReceitas implements Persistable {

    private int id;
    private String nome;
    private char debitoCredito;

    public int getId() {
        return this.id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getNome() {
        return this.nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public char getDebitoCredito() {
        return this.debitoCredito;
    }

    public void setDebitoCredito(char debitoCredito) {
        this.debitoCredito = debitoCredito;
    }

    public void save() {
        try {
            setId(PersistableManager.getInstance().save(this));
            PersistableManager.getInstance().save(this);

        } catch (FloggyException ex) {
            ex.printStackTrace();
        }
    }    
}